/**
 * @Author: songgh
 * @Date: 2021-09-20 14:41:08
 * @LastEditors: songgh
 * @LastEditTime: 2021-09-20 15:41:08
 * @Description: router
 */
import { createRouter, createWebHistory } from "vue-router";
import { Empty, Login, Home, ServiceList, ServiceForm } from "@src/views";

const routerHistory = createWebHistory("/planner/");

const router = createRouter({
  history: routerHistory,
  routes: [
    {
      path: "/",
      redirect: "/login"
    },
    {
      path: "/empty",
      name: "Empty",
      component: Empty
    },
    {
      path: "/login",
      name: "login",
      component: Login,
    },
    {
      path: "/home",
      name: "home",
      component: Home,
    },
    {
      path: "/service-list",
      name: 'ServiceList',
      component: ServiceList,
    },
    {
      path: "/service-form",
      name: 'ServiceForm',
      component: ServiceForm,
    },
    { path: '/:pathMatch(.*)*', name: 'NotFound', redirect: '/empty' },
  ],
});

export default router;
